/*
 * Location.h
 *
 *  Created on: 15-Dec-2009
 *      Author: pmui
 */

#ifndef LOCATION_H_
#define LOCATION_H_

#include <QWidget>

class QMainWindow;
class QWebFrame;

#ifdef Q_OS_SYMBIAN
#include <QGeoPositionInfoSource.h>
QTM_USE_NAMESPACE
#endif

class Q_DECL_EXPORT Location : public QObject
{
	Q_OBJECT
	
public:
	Location();
	virtual ~Location();
	
	void setEnvironment(QMainWindow *parentWindow, QWebFrame *webFrame);
	
signals:
	void positionUpdated();
	
public slots:
	double longitude();
	double latitude();
	double altitude();
	
	int satelliteNumView();
	int satelliteNumViewUsed();
	int horizontalSpeed();
	int horizontalSpeedError();
	int trueCourse();
	int trueCourseError();
	int magneticHeading();
	int magneticHeadingError();
	int heading();
	int headingError();
	int magneticCourse();
	int magneticCourseError();
		
#ifdef Q_OS_SYMBIAN
private slots:
	void positionUpdated(const QGeoPositionInfo& positionInfo);

private:
	QGeoPositionInfoSource *m_posInfoSource;
	QGeoPositionInfo m_currentPosition;
#endif

};

#endif /* LOCATION_H_ */
